<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>QuarkJS API Reference - Text</title>

		<link href="../../css/bootstrap.css" rel="stylesheet">
	    <style type="text/css">
	      body {
	        padding-top: 60px;
	        padding-bottom: 40px;
	      }
	      .sidebar-nav {
	        padding: 9px 0;
	      }
	      .hero-unit {
	        padding: 30px;
	      }
	      .hero-unit p {
	        font-size: 16px;
	      }
	      .hero-unit li {
	        font-size: 16px;
	        line-height: 24px;
	      }
	      .fixedFont{
	      	font-family: courier;
	      }
	    </style>
	    <link href="../../css/bootstrap-responsive.css" rel="stylesheet">

	</head>

	<body>
		<div class="navbar navbar-fixed-top">
		  <div class="navbar-inner">
		    <div class="container-fluid">
		      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </a>
		      <a class="brand" href="#">QuarkJS - An HTML5 Game Framework</a>
		      <div class="nav-collapse">
		        <ul class="nav">
		          <li><a href="../../index.html">首页</a></li>
		          <li><a href="http://github.com/quark-dev-team/quarkjs" target="_blank">源码下载</a></li>
		          <li class="active"><a href="../index.html">API文档</a></li>
		          <li><a href="../../tutorial.html">使用指南</a></li>
		          <li><a href="../../demo.html">作品演示</a></li>
		        </ul>
		      </div>
		    </div>
		  </div>
		</div>

		<div class="container-fluid">
      		<div class="row-fluid">
      			<div class="span3">
      				<div class="well sidebar-nav">
<ul class="nav nav-list">
  <li class="nav-header">类列表</li>
  
	<li></li>
	
	<li><a href="../symbols/Audio.html">Audio</a></li>
	
	<li><a href="../symbols/Bitmap.html">Bitmap</a></li>
	
	<li><a href="../symbols/Button.html">Button</a></li>
	
	<li><a href="../symbols/CanvasContext.html">CanvasContext</a></li>
	
	<li><a href="../symbols/Context.html">Context</a></li>
	
	<li><a href="../symbols/DisplayObject.html">DisplayObject</a></li>
	
	<li><a href="../symbols/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
	
	<li><a href="../symbols/DOMContext.html">DOMContext</a></li>
	
	<li><a href="../symbols/Drawable.html">Drawable</a></li>
	
	<li><a href="../symbols/EventDispatcher.html">EventDispatcher</a></li>
	
	<li><a href="../symbols/EventManager.html">EventManager</a></li>
	
	<li><a href="../symbols/Graphics.html">Graphics</a></li>
	
	<li><a href="../symbols/ImageLoader.html">ImageLoader</a></li>
	
	<li><a href="../symbols/MovieClip.html">MovieClip</a></li>
	
	<li><a href="../symbols/Quark.html">Quark</a></li>
	
	<li><a href="../symbols/Stage.html">Stage</a></li>
	
	<li><a href="../symbols/Text.html">Text</a></li>
	
	<li><a href="../symbols/Timer.html">Timer</a></li>
	
	<li><a href="../symbols/Tween.html">Tween</a></li>
	 
</ul>
</div>
      			</div>
      			<div class="span9">

      				<!-- ============================== class title ============================ -->
      				<h1 style="color:#333;">
  					
					Class Text
      				</h1><br/>

          			<!-- ============================== class summary ========================== -->			
					<p class="description">
						
						<span style="display:block;margin-bottom:5px;">继承自 
							<a href="../symbols/DisplayObject.html">DisplayObject</a>.</span>
						
					
						Text类提供简单的文字显示功能。
						
					</p>

					<!-- ============================== constructor summary ==================== -->			
					
					<h3 style="margin-bottom:6px;">构造函数概览</h3>
					<table class="table table-striped table-bordered table-condensed" cellspacing="0" summary="A summary of the constructor documented in the class Text.">
						<thead>
							<tr>
								<th scope="col" style="width:10%;"></th>
								<th scope="col">说明</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td class="attributes">&nbsp;</td>
								<td class="nameDescription" >
									<div class="fixedFont">
										<b><a href="../symbols/Text.html#constructor">Text</a></b>()
									</div>
									<div class="description">构造函数。</div>
								</td>
							</tr>
						</tbody>
					</table>
					

					<!-- ============================== properties summary ===================== -->
					
					
						
						<h3 style="margin-bottom:6px;">属性概览</h3>
						<table class="table table-striped table-bordered table-condensed" cellspacing="0" summary="A summary of the fields documented in the class Text.">
							<thead>
								<tr>
									<th scope="col" style="width:10%;"></th>
									<th scope="col">说明</th>
								</tr>
							</thead>
							<tbody>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#color">color</a></b>
										</div>
										<div class="description">指定使用的字体颜色。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#font">font</a></b>
										</div>
										<div class="description">指定使用的字体样式。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#fontMetrics">fontMetrics</a></b>
										</div>
										<div class="description">指定字体的度量对象。一般可忽略此属性，可用于提高性能。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#lineSpacing">lineSpacing</a></b>
										</div>
										<div class="description">指定文本的行距。单位为像素。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#lineWidth">lineWidth</a></b>
										</div>
										<div class="description">指定文本行的最大宽度。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#maxWidth">maxWidth</a></b>
										</div>
										<div class="description">指定文本绘制的最大宽度。仅在canvas中使用。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#outline">outline</a></b>
										</div>
										<div class="description">指定文本是绘制边框还是填充。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#text">text</a></b>
										</div>
										<div class="description">指定要显示的文本内容。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/Text.html#textAlign">textAlign</a></b>
										</div>
										<div class="description">指定文本的对齐方式。可以是以下任意一个值："start", "end", "left", "right", and "center"。</div>
									</td>
								</tr>
							
							</tbody>
						</table>
						
						
						
						<dl class="inheritsList">
						<dt>从类 <a href="../symbols/DisplayObject.html">DisplayObject</a> 继承的属性: </dt><dd><a href="../symbols/DisplayObject.html#alpha">alpha</a>, <a href="../symbols/DisplayObject.html#eventEnabled">eventEnabled</a>, <a href="../symbols/DisplayObject.html#height">height</a>, <a href="../symbols/DisplayObject.html#id">id</a>, <a href="../symbols/DisplayObject.html#mask">mask</a>, <a href="../symbols/DisplayObject.html#name">name</a>, <a href="../symbols/DisplayObject.html#parent">parent</a>, <a href="../symbols/DisplayObject.html#polyArea">polyArea</a>, <a href="../symbols/DisplayObject.html#regX">regX</a>, <a href="../symbols/DisplayObject.html#regY">regY</a>, <a href="../symbols/DisplayObject.html#rotation">rotation</a>, <a href="../symbols/DisplayObject.html#scaleX">scaleX</a>, <a href="../symbols/DisplayObject.html#scaleY">scaleY</a>, <a href="../symbols/DisplayObject.html#transformEnabled">transformEnabled</a>, <a href="../symbols/DisplayObject.html#useHandCursor">useHandCursor</a>, <a href="../symbols/DisplayObject.html#visible">visible</a>, <a href="../symbols/DisplayObject.html#width">width</a>, <a href="../symbols/DisplayObject.html#x">x</a>, <a href="../symbols/DisplayObject.html#y">y</a></dd>
						</dl>
						
					

					<!-- ============================== methods summary ======================== -->
					
						
						
						<h3 style="margin-bottom:6px;">方法概览</h3>
						<table class="table table-striped table-bordered table-condensed" cellspacing="0" summary="A summary of the methods documented in the class Text.">
							<thead>
								<tr>
									<th scope="col" style="width:10%;"></th>
									<th scope="col">说明</th>
								</tr>
							</thead>
							<tbody>
							
								<tr>
									<td class="attributes">&lt;static&gt; &nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">Text.<b><a href="../symbols/Text.html#.getFontMetrics">getFontMetrics</a></b>(font)
										</div>
										<div class="description">此方法可帮助我们得到指定字体的行高、基准线等度量信息。</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/Text.html#setFont">setFont</a></b>(font, ignoreFontMetrics)
										</div>
										<div class="description">指定渲染文本的字体样式。</div>
									</td>
								</tr>
							
							</tbody>
						</table>
						
						
						
						<dl class="inheritsList">
						<dt>从类 <a href="../symbols/DisplayObject.html">DisplayObject</a> 继承的方法: </dt><dd><a href="../symbols/DisplayObject.html#getBounds">getBounds</a>, <a href="../symbols/DisplayObject.html#getCurrentHeight">getCurrentHeight</a>, <a href="../symbols/DisplayObject.html#getCurrentWidth">getCurrentWidth</a>, <a href="../symbols/DisplayObject.html#getDrawable">getDrawable</a>, <a href="../symbols/DisplayObject.html#getStage">getStage</a>, <a href="../symbols/DisplayObject.html#getState">getState</a>, <a href="../symbols/DisplayObject.html#globalToLocal">globalToLocal</a>, <a href="../symbols/DisplayObject.html#hitTestObject">hitTestObject</a>, <a href="../symbols/DisplayObject.html#hitTestPoint">hitTestPoint</a>, <a href="../symbols/DisplayObject.html#localToGlobal">localToGlobal</a>, <a href="../symbols/DisplayObject.html#localToTarget">localToTarget</a>, <a href="../symbols/DisplayObject.html#propChanged">propChanged</a>, <a href="../symbols/DisplayObject.html#render">render</a>, <a href="../symbols/DisplayObject.html#saveState">saveState</a>, <a href="../symbols/DisplayObject.html#setDrawable">setDrawable</a>, <a href="../symbols/DisplayObject.html#toString">toString</a>, <a href="../symbols/DisplayObject.html#update">update</a></dd><dt>从类 <a href="../symbols/EventDispatcher.html">EventDispatcher</a> 继承的方法: </dt><dd><a href="../symbols/EventDispatcher.html#addEventListener">addEventListener</a>, <a href="../symbols/EventDispatcher.html#dispatchEvent">dispatchEvent</a>, <a href="../symbols/EventDispatcher.html#hasEventListener">hasEventListener</a>, <a href="../symbols/EventDispatcher.html#removeAllEventListeners">removeAllEventListeners</a>, <a href="../symbols/EventDispatcher.html#removeEventListener">removeEventListener</a>, <a href="../symbols/EventDispatcher.html#removeEventListenerByType">removeEventListenerByType</a></dd>
						</dl>
						
					
					<!-- ============================== events summary ======================== -->
					

					<!-- ============================== constructor details ==================== -->		
					
					<div class="details"><a name="constructor"> </a>
						<h3 style="margin-bottom:6px;">构造函数详细信息</h3>
						
						<div class="fixedFont">
								<b>Text</b>()
						</div>
						
						<div class="description">
							构造函数。
							
						</div>
						
						
						
						
							
							
							
							
							
							
							

					</div>
					<hr/>
					

					<!-- ============================== field details ========================== -->		
					
						<h3 style="margin-bottom:6px;">属性详细信息</h3>

						
							<a name="color"> </a>
							<div class="fixedFont">
							
							
							<b>color</b>
							
							</div>
							<div class="description">
								指定使用的字体颜色。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="font"> </a>
							<div class="fixedFont">
							
							
							<b>font</b>
							
							</div>
							<div class="description">
								指定使用的字体样式。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="fontMetrics"> </a>
							<div class="fixedFont">
							
							
							<b>fontMetrics</b>
							
							</div>
							<div class="description">
								指定字体的度量对象。一般可忽略此属性，可用于提高性能。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="lineSpacing"> </a>
							<div class="fixedFont">
							
							
							<b>lineSpacing</b>
							
							</div>
							<div class="description">
								指定文本的行距。单位为像素。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="lineWidth"> </a>
							<div class="fixedFont">
							
							
							<b>lineWidth</b>
							
							</div>
							<div class="description">
								指定文本行的最大宽度。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="maxWidth"> </a>
							<div class="fixedFont">
							
							
							<b>maxWidth</b>
							
							</div>
							<div class="description">
								指定文本绘制的最大宽度。仅在canvas中使用。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="outline"> </a>
							<div class="fixedFont">
							
							
							<b>outline</b>
							
							</div>
							<div class="description">
								指定文本是绘制边框还是填充。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="text"> </a>
							<div class="fixedFont">
							
							
							<b>text</b>
							
							</div>
							<div class="description">
								指定要显示的文本内容。
								
								
							</div>
							
							

								
								
								
								

							<hr />
						
							<a name="textAlign"> </a>
							<div class="fixedFont">
							
							
							<b>textAlign</b>
							
							</div>
							<div class="description">
								指定文本的对齐方式。可以是以下任意一个值："start", "end", "left", "right", and "center"。
								
								
							</div>
							
							

								
								
								
								

							
						
						<hr/>
					

					<!-- ============================== method details ========================= -->		
					
						<h3 style="margin-bottom:6px;">方法详细信息</h3>

						
							<a name=".getFontMetrics"> </a>
							<div class="fixedFont">&lt;static&gt; 
							
							<span class="light">{Object}</span>
							<span class="light">Text.</span><b>getFontMetrics</b>(font)
							
							</div>
							<div class="description">
								此方法可帮助我们得到指定字体的行高、基准线等度量信息。
								
								
							</div>
							
							
							
								
									<dl class="detailList">
									<dt class="heading">参数:</dt>
									
										<dt>
											<b>font</b>
											
										</dt>
										<dd></dd>
									
									</dl>
								
								
								
								
								
									<dl class="detailList">
									<dt class="heading">返回值:</dt>
									
										<dd><span class="light fixedFont">{Object}</span> 返回字体的度量信息，包括height、ascent、descent等。</dd>
									
									</dl>
								
								
								

							<hr />
						
							<a name="setFont"> </a>
							<div class="fixedFont">
							
							
							<b>setFont</b>(font, ignoreFontMetrics)
							
							</div>
							<div class="description">
								指定渲染文本的字体样式。
								
								
							</div>
							
							
							
								
									<dl class="detailList">
									<dt class="heading">参数:</dt>
									
										<dt>
											<b>font</b>
											
										</dt>
										<dd></dd>
									
										<dt>
											<b>ignoreFontMetrics</b>
											
										</dt>
										<dd></dd>
									
									</dl>
								
								
								
								
								
								
								

							
						
					
					
					<!-- ============================== event details ========================= -->		
					


      			</div>
      		</div>

      		<hr>
      		<footer>
        		<p style="text-align:center;">&copy; QuarkJS Dev-Team 2012</p>
      		</footer>

      	</div>

		<script src="../../js/jquery.js"></script>
    	<script src="../../js/bootstrap.js"></script>

	</body>
</html>
